<template>
  <div class="my-box">
      <div>Computed操作：看控制台</div><div> --- {{count}}</div>
  </div>
</template>
<script lang="ts" setup>
import { computed, ref  } from 'vue';

const count = ref(1)

//声明method 方法
const doubleCount = computed(()=>{
    return count.value * 2
})

//获取 
console.log(doubleCount.value)
</script>

<style scoped>
.my-box{
    display: flex;
}
  /* 支持CSS变量注入v-bind(color) */
</style>
